This invention relates to the field of data processing systems. More particularly, this invention relates to data processing systems including a branch prediction mechanism and the control of that branch prediction mechanism.
It is known to provide processors including branch prediction mechanisms which operate in various ways to make a prediction as to whether a branch instruction within a sequence of program instructions will or will not result in a branch operation (a jump in program flow). Accurately predicting whether or not branch instructions will result in a branch operation has the result that fetching program instructions from memory locations in accordance with the predicted outcome of the branch may be commenced before it is known whether that branch will actually result in a branch operation, e.g. whether the branch will pass its condition codes or whether it will result in a branch to the same location as previously in the case of an indirect branch or the like. The circuit and complexity overhead associated with such branch prediction mechanisms is justified by the significant performance increase that they yield. In particular, accurately predicting branch outcomes reduces the likelihood of incorrect program instructions being speculatively fetched prior to execution of the branch instruction with the consequence of a pipeline flush and re-fetching of the correct sequence of instructions being required.
Techniques which can increase the accuracy and effectiveness of branch prediction mechanisms are strongly advantageous in improving processor performance.